package com.prjsystem.dao.impl;

import java.util.List;

import com.prjsystem.dao.BaseDao;
import com.prjsystem.dao.DailyWorkMstDao;
import com.prjsystem.entity.Daily;
import com.prjsystem.entity.DailyWorkBean;

public class DailyWorkMstDaoImpl extends BaseDao implements DailyWorkMstDao{
	//add all information of DailyWork include WR&DailyWork
	public void addDW(DailyWorkBean dailyWorkBean) {
   
		excuteInsert("DW.insertDaily", dailyWorkBean.getDaily());
      
	}
	public void insertAllInfo(DailyWorkBean dailyWorkBean) {
		   
		excuteInsert("DW.insertAllInfo", dailyWorkBean);
	}
	@SuppressWarnings("unchecked")
	@Override
	public List<Daily> searchDailyByKey(String dwId) {
		return excuteQueryForList("DW.searchByKey", dwId);
	}
	//update all information of DailyWork include WR&DailyWork
	@Override
	public void updateDailyInfoDetail(Daily daily) {
		excuteUpdate("DW.updateDetail", daily);
	}
	//delete all information of dailyWork include dailyWork,WorkRequest
	//search wrNo before delete dailyWork information
	@SuppressWarnings("unchecked")
	@Override
	public List<Daily> searchwrNoBykey(Object object) {
		return excuteQueryForList("DW.searchwrNoBykey", object);
	}
	@Override
	public void deleteDialWorkInfoByKey(Object object) {
		excuteDelete("DW.deleteDialWorkInfoByKey", object);
		
	}
	@Override
	public void insertAllInfo(Daily daily) {
		// TODO Auto-generated method stub
		excuteInsert("DW.insertAllInfo",daily);
	}
	@SuppressWarnings("unchecked")
	@Override
	public List<Daily> searchAllDailyByDate(Daily daily) {
		// TODO Auto-generated method stub
		return excuteQueryForList("DW.searchAllDailyByDate", daily);
	}
}
